<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="${base}/statics/lib/html5.js"></script>
<script type="text/javascript" src="${base}/statics/lib/respond.min.js"></script>
<script type="text/javascript" src="${base}/statics/lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="${base}/statics/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="${base}/statics/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="${base}/statics/lib/icheck/icheck.css" />
<link rel="stylesheet" type="text/css" href="${base}/statics/lib/Hui-iconfont/1.0.7/iconfont.css" />
<style>
	.form-label{float:left;}
	.formControls{float:left;}
	.col-4{float:left;}
</style>
</head>
<body>
<div class="pd-20">
  <form action="" method="post" class="form form-horizontal" id="form-edit">
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>名称：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text" value="" placeholder="分类名称" id="category_name" name="category_name" datatype="*2-16" nullmsg="菜单不能为空">
      </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3">父级：</label>
      <div class="formControls col-5"> <span class="select-box">
        <select class="select" size="1" name="category_pid">
          <option value="" selected>请选择分类</option>
          <#list list as vo>
          	<#if vo.category_pid??&& vo.category_pid == 0>
				<option value="${vo.category_id}">${vo.category_name}</option>
				<#list list as vo1>
					<#if vo1.category_pid??&& vo1.category_pid == vo.category_id>
					   <option value="${vo1.category_id}">&nbsp;&nbsp;├${vo1.category_name}</option>
					   <#list list as vo2>
							<#if vo2.category_pid??&& vo2.category_pid == vo1.category_id>
							   <option value="${vo2.category_id}">&nbsp;&nbsp;&nbsp;&nbsp;├${vo2.category_name}</option>
							</#if>
						</#list>
					</#if>
				</#list>
			</#if>
		  </#list>
        </select>
        </span> </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>页面标题：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text" value="" placeholder="页面标题" id="category_title" name="category_title" >
      </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>关键字：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text" value="" placeholder="关键字" id="category_keys" name="category_keys">
      </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>描述：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text" value="" placeholder="描述" id="category_desc" name="category_desc">
      </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <label class="form-label col-3"><span class="c-red">*</span>排序：</label>
      <div class="formControls col-5">
        <input type="text" class="input-text" value="" placeholder="排序" id="category_order" name="category_order" datatype="n" nullmsg="排序不能为空">
      </div>
      <div class="col-4"> </div>
    </div>
    <div class="row cl">
      <div class="col-9 col-offset-3">
        <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
      </div>
    </div>
  </form>
</div>
</div>
<script type="text/javascript" src="${base}/statics/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="${base}/statics/lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="${base}/statics/lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="${base}/statics/lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="${base}/statics/h-ui/js/H-ui.js"></script> 
<script type="text/javascript" src="${base}/statics/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-edit").Validform({
		tiptype:4,
		ajaxPost:true,
		callback:function(data){
			layer.msg(data.msg);
			if(data.status==1){
				setTimeout(function(){
					var index = parent.layer.getFrameIndex(window.name);
					parent.treegrid();
					parent.layer.close(index);
				},1000);
				
			}
		}
	});
});
</script>
</body>
</html>